<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area">
      <text class="title">{{ title }}</text>
      <uni-badge text="张"></uni-badge>
      <uni-badge text="三" type="success"></uni-badge>
      <uni-badge text="1.0" type="primary" :inverted="true"></uni-badge>
      <!-- <uni-tag
        text="111"
        size="normal"
        type="default"
        @click=""
      /> -->
      <!-- <view>{{addZeroCount}}</view>
      <button @click="countAdd">count++</button> -->
      
    </view>
    <view>Pinia:{{counter.count}}</view>
    <button @click="counter.addCount">Pinia:count++</button>
  </view>
</template>

<script setup lang="ts">
import { ref,onMounted,computed } from 'vue'
// pinia 
import { useCounterStore } from '@/stores/counter'
const title = ref('Hello')
const count = ref(0)
const countAdd = ()=>{
  count.value++
}
const addZeroCount = computed(()=>{
  return count.value<10?'0'+count.value:count.value
})

const counter = useCounterStore()
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
